<?php
/**
 * File description.
 * 
 * @filesource
 * @author Michael N <webjestic@gmail.com>
 * @link http://webjestic.net webJestic
 * @license http://www.opensource.org/licenses/bsd-license.php BSD
 * @copyright Copyright (c) 2009 - webJestic.NET.  All Rights Reserved.
 * 
 * @category   webJestic
 * @package    Application 
 * @subpackage Index
 * @version    $Id$
 */

$mtime = explode(' ', microtime());
$mtime = ($mtime[1] + $mtime[0]);
define('REQUEST_MTIME', $mtime);

date_default_timezone_set('America/New_York');

if(strtoupper (substr(PHP_OS, 0,3)) == 'WIN')
	defined('WINDOWS_OS') || define('WINDOWS_OS', TRUE);
else
	defined('WINDOWS_OS') || define('WINDOWS_OS', FALSE);

$path = get_include_path();
set_include_path($path . PATH_SEPARATOR . realpath(dirname(__FILE__).'/library'));

// TODO: This is DEVELOPMENT, Remove For PRODUCTION
set_include_path(realpath(dirname(__FILE__).'/library'));


defined('INDEX_PATH') || define('INDEX_PATH', realpath(dirname(__FILE__)));
defined('APPLICATION_PATH') || define('APPLICATION_PATH', INDEX_PATH.'/application');
 defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV'):'production');

require_once 'Zend/Application.php';

$conf = APPLICATION_PATH . '/config/application.ini';
$application = new Zend_Application(APPLICATION_ENV, $conf);
$application->bootstrap()->run();

$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $mtime), 4);
echo '<!-- Request processed in '.$total_time.' seconds. -->';
     
?>